package org.bee.enums;

/**
 * 页面元素类型
 */
public enum ElementType {
    MENU("0", "菜单"),

    BUTTON("1", "按钮");
    private String code;
    private String codeMean;

    ElementType(String code, String codeMean) {
        this.code = code;
        this.codeMean = codeMean;
    }
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCodeMean() {
        return codeMean;
    }

    public void setCodeMean(String codeMean) {
        this.codeMean = codeMean;
    }

    public static String getCodeMean(String code) {
        for (ElementType elementType : ElementType.values()) {
            if (elementType.getCode().equals(code)) {
                return elementType.getCodeMean();
            }
        }
        return null;
    }
}
